Component({
  properties: {
    list: {
      type: Object,
      value: {},
      observer: function (newData, oldData) {
        this.onLoad()
      }
    },
    interval: {
      type: Number,
      value: 1000
    },
    OwnerOrPassengerRelease: {
      type: String,
      value: 'owner',
      observer: function (newData, oldData) {
        this.changeColor()
      }
    }
  },
  data: {
    banner: [],
    color: '#00c2c1'
  },
  methods: {
    swiperClick () {

    },
    onLoad: function () {
      var banner = this.properties.list;
      var interval = this.properties.interval;
      this.setData({
        banner: banner,
        interval: interval
      })
    },
    gotoDetails (e) {
      console.log(e);
      let item = e.currentTarget.dataset.item
      wx.navigateTo({
        url: '/pages/subpackage/RoundMapDetails/index?id='+item.id
      })
    },
    changeColor () {
      var color = this.properties.OwnerOrPassengerRelease == 'owner'?'#00c2c1': '#1ba4fb';
      this.setData({
        color
      })
    }
  }
})